load("//tools:defaults.bzl", "ts_devserver", "ts_library")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")

package(default_visibility = ["//modules/benchmarks:__subpackages__"])

ts_library(
    name = "incremental_dom",
    srcs = glob(["*.ts"]),
    tsconfig = "//modules/benchmarks:tsconfig-build.json",
    deps = [
        "//modules/benchmarks/src:util_lib",
        "//modules/benchmarks/src/largetable:util_lib",
    ],
)

ts_devserver(
    name = "devserver",
    entry_module = "angular/modules/benchmarks/src/largetable/incremental_dom/index",
    port = 4200,
    static_files = [
        "index.html",
        "@npm//:node_modules/incremental-dom/dist/incremental-dom.js",
    ],
    deps = [":incremental_dom"],
)

benchmark_test(
    name = "perf",
    server = ":devserver",
    deps = ["//modules/benchmarks/src/largetable:perf_lib"],
)
